<template>
	<div class='h-100'>
		<section class='relative content-box'>
			<el-form id='form' :model='formData' :rules='rules'  ref='form' label-width='120px' label-position='left'>
				<el-form-item label='账号' prop='store_account'>
					<el-input v-model='formData.store_account' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='门店名称' prop='store_name'>
					<el-input v-model='formData.store_name' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='联系人'>
					<el-input v-model='formData.contact' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='联系方式'>
					<el-input v-model='formData.mobile' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='客服电话' prop='service_telephone'>
					<el-input v-model='formData.service_telephone' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='分成比例' prop='profit_rate'>
					<el-input v-model='formData.profit_rate' type='number' autocomplete='off'>
						<template slot='append'>%</template>
					</el-input>
				</el-form-item>
				<el-form-item label='所在地区'>
					<mselect :count='3' :initValues='[formData.province_id || "", formData.city_id || "", formData.district_id || ""]' url='Area/getArea' queryName='id' v-on:select='formData.province_id=$event[0];formData.city_id=$event[1];formData.district_id=$event[2]'></mselect>
				</el-form-item>
				<el-form-item label='详细地址'>
					<el-input v-model='formData.address' type='text' autocomplete='off'></el-input>
				</el-form-item>
				<el-form-item label='是否启用'>
					<el-switch v-model='formData.enable'></el-switch>
				</el-form-item>

				<el-form-item label=''>
					<el-button @click='$router.go(-1)'>返回</el-button>
					<el-button @click='submit' class='m-l-20' type="primary">保存</el-button>
				</el-form-item>
			</el-form>
		</section>
	</div>
</template>

<script src='./add.js'></script>

<style lang='less' scoped>
	#form{
		width:800px;
		margin:auto;
	}
</style>